package com.action;

import com.dao.ITabAttendanceDao;
import com.opensymphony.xwork2.ModelDriven;
import com.po.TabAttendance;

public class TabAttendanceAction extends BaseAction implements ModelDriven<TabAttendance>{

	TabAttendance form = new TabAttendance();
	public TabAttendance getModel(){
		return form;
	}
	private ITabAttendanceDao tabAttendanceDao;
	public void setTabAttendanceDao(ITabAttendanceDao tabAttendanceDao){
		this.tabAttendanceDao = tabAttendanceDao;
	}

	public String findByList(){
		form.setPager_count(tabAttendanceDao.findByCount(form));
		form.setTabalist(tabAttendanceDao.findByList(form));
		return SUCCESS;
	}

	public String deleteObject(){
		tabAttendanceDao.deleteObejct(form);
		findByList();
		return SUCCESS;
	}
	
	public String updateObject(){
		tabAttendanceDao.updateObject(form);
		return "update";
	}

	

}
